//
//  NetworkTool.m
//  单例
//
//  Created by I Do Believe on 15/11/26.
//  Copyright © 2015年 apple11. All rights reserved.
//

#import "NetworkTool.h"

@implementation NetworkTool

+(instancetype)sharedInstance {
    static id instance;
    
    //执行一次创建
    static dispatch_once_t onceToken;
    //在还没执行dispatch_once_t时，onceToken的值为0
    NSLog(@"OC onceToken: %zd",onceToken);
          dispatch_once(&onceToken,^{
        instance = [[NetworkTool alloc] init];
    });
    return instance;
}

@end
